package OOP;

public class oopDemo {

    public static void main(String[] args) {
        Book book = new Book();

        book.name = "十万个为什么";
        function1(book);
        System.out.println(book.name);

        function2(book);
        System.out.println(book.name);
    }

    private static void function1(Book book) {
        book.name = "百万个为什么";
    }

    private static void function2(Book book) {
        book = new Book();
        book.name = "千万个为什么";
    }

}
class Book{
    public String name;
}